package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 车辆使用记录对象 vehicle_usage
 * 
 * @author ruoyi
 * @date 2025-04-05
 */
public class VehicleUsage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 使用记录ID */
    private Long id;

    /** 车牌号，关联vehicle_info表的vehicle_number */
    @Excel(name = "车牌号")
    private String vehicleNumber;

    /** 驾驶员编号，关联driver_info表的driver_number */
    @Excel(name = "驾驶员编号")
    private String driverNumber;

    /** 使用开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 使用结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 使用状态，1表示正在使用，2表示已归还 */
    private Long status;

    /** 使用状态，1表示正在使用，2表示已归还 */
    @Excel(name = "使用状态")
    private String statusName;

    /** 行程信息，记录从哪里到哪里 */
    @Excel(name = "行程信息")
    private String whereToWhere;


    //起点
    private String fromWhere;
    //终点
    private String toWhere;

    /** 逻辑删除标记，0表示未删除，1表示已删除 */
    private Long isDeleted;

    /** 使用开始时间的查询开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTimeOfUseBegin;

    /** 使用开始时间的查询结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTimeOfUseBegin;

    /** 使用结束时间的查询开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTimeOfUseEnd;

    /** 使用结束时间的查询结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTimeOfUseEnd;


    public Date getStartTimeOfUseBegin() {
        return startTimeOfUseBegin;
    }

    public void setStartTimeOfUseBegin(Date startTimeOfUseBegin) {
        this.startTimeOfUseBegin = startTimeOfUseBegin;
    }

    public Date getEndTimeOfUseBegin() {
        return endTimeOfUseBegin;
    }

    public void setEndTimeOfUseBegin(Date endTimeOfUseBegin) {
        this.endTimeOfUseBegin = endTimeOfUseBegin;
    }

    public Date getStartTimeOfUseEnd() {
        return startTimeOfUseEnd;
    }

    public void setStartTimeOfUseEnd(Date startTimeOfUseEnd) {
        this.startTimeOfUseEnd = startTimeOfUseEnd;
    }

    public Date getEndTimeOfUseEnd() {
        return endTimeOfUseEnd;
    }

    public void setEndTimeOfUseEnd(Date endTimeOfUseEnd) {
        this.endTimeOfUseEnd = endTimeOfUseEnd;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setVehicleNumber(String vehicleNumber) 
    {
        this.vehicleNumber = vehicleNumber;
    }

    public String getVehicleNumber() 
    {
        return vehicleNumber;
    }
    public void setDriverNumber(String driverNumber) 
    {
        this.driverNumber = driverNumber;
    }

    public String getDriverNumber() 
    {
        return driverNumber;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setWhereToWhere(String whereToWhere) 
    {
        this.whereToWhere = whereToWhere;
    }

    public String getWhereToWhere() 
    {
        return whereToWhere;
    }
    public void setIsDeleted(Long isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public String getFromWhere() {
        return fromWhere;
    }

    public void setFromWhere(String fromWhere) {
        this.fromWhere = fromWhere;
    }

    public String getToWhere() {
        return toWhere;
    }

    public void setToWhere(String toWhere) {
        this.toWhere = toWhere;
    }

    public Long getIsDeleted()
    {
        return isDeleted;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String transStatusName()
    {
        if (status == 1) {
            return "正在使用";
        } else if (status == 2) {
            return "已归还";
        } else {
            return "未知";
        }
    }

    @Override
    public String toString() {
        return "VehicleUsage{" +
                "id=" + id +
                ", vehicleNumber='" + vehicleNumber + '\'' +
                ", driverNumber='" + driverNumber + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", status=" + status +
                ", statusName='" + statusName + '\'' +
                ", whereToWhere='" + whereToWhere + '\'' +
                ", isDeleted=" + isDeleted +
                ", startTimeOfUseBegin=" + startTimeOfUseBegin +
                ", endTimeOfUseBegin=" + endTimeOfUseBegin +
                ", startTimeOfUseEnd=" + startTimeOfUseEnd +
                ", endTimeOfUseEnd=" + endTimeOfUseEnd +
                '}';
    }
}
